1. Field of the Invention
The invention relates to a timer apparatus which is built in, for example, a microcomputer in order to control the operation of the microcomputer and, more particularly, to a timer apparatus constructed by a plurality of timers.
2. Related Background Art
There is a case where a microcomputer uses a timer apparatus comprising a plurality of timers in order to control a plurality of operating times.
Each timer of the timer apparatus has a counter and a register provided in correspondence to the counter. An operation command showing the start or stop of the operation of the counter is written into the register of each timer. The operation command to the counter is written into the register, so that the operation of the counter is controlled. The operation control of the counter results in the operation control of the timer.
A different address for each timer is previously allocated to each timer provided with the register. Address information about the address allocated to the timer including the register corresponding to the counter is given to the operation command to the counter.
The operation command to each counter is sequentially written into the register of the timer to which the address corresponding to the address information has been allocated on the basis of the address information synchronously with a clock as a reference signal of the operation of the microcomputer, so that the operation of each timer is controlled.
As mentioned above, in the conventional timer apparatus, since the addresses which are allocated to the operation commands to the counters are mutually different for every timer, the operation command to each counter is sequentially written into the register synchronously with the clock.
If the operation commands to the counters can be simultaneously written into the registers, the timers can be simultaneously made operative. In the conventional timer apparatus, however, since an address is allocated to every timer and the address information of each timer is allocated to the operation command to the counter of each timer as mentioned above, a difference occurs among the times when the operation command to the counter of each timer is written into each register. Consequently, the operation commands to the counters of the timers cannot be simultaneously written into the registers.
In the conventional timer apparatus, therefore, even when the user wants to simultaneously control the operations of a plurality of timers, a deviation corresponding to at least a period of the clock occurs in the start timing of the operation control of each timer.
Because of the above reason, in the conventional timer apparatus, the operations of a plurality of timers cannot be simultaneously controlled, for example, without adjusting the operation of the counter of each timer in a software manner. There is, consequently, a problem such that it is troublesome to simultaneously control the operations of a plurality of timers.